package com.pms.validators;


import java.util.Hashtable;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.pms.framework.Validator;


public class CommonValidator implements Validator {

	public Hashtable validate(HttpServletRequest request , HttpServletResponse response) {
		
		
		Hashtable error = new Hashtable();

		if(request.getSession().getAttribute("user") == null){
			error.put("error", "Your session has been expired. Please, re-login..");
			request.setAttribute("error",error);
			request.setAttribute("nextPageToken", "needLogin");
			request.setAttribute("plainPage", "TRUE");
		}
		
		return error;
	}

}
